package com.recipe.enums;

/**
 * @author lzk
 * @date 2024-06-18 10:03:37
 * @description
 */
public enum DishCollectStatusEnum {
    COLLECT(1, "收藏"),
    UN_COLLECT(0, "取消收藏");

    public int code;

    public String desc;

    DishCollectStatusEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static DishCollectStatusEnum getByCode(int codeVal) {
        for (DishCollectStatusEnum resultCodeEnum : DishCollectStatusEnum.values()) {
            if (resultCodeEnum.code == codeVal) {
                return resultCodeEnum;
            }
        }
        return null;
    }
}
